<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<style>
	.errorMessage {border: 2px solid red;}
	.errors {border: 2px solid green;}
</style>

<h2>form</h2>
<form:form commandName="user" method="post">
	<div class="errors"><form:errors path="*" delimiter=" / "/></div>
		
	<form:label path="name" cssErrorClass="errorMessage">이름</form:label> : 
	<form:input path="name" size="30"/>
	<form:errors path="name" cssClass="errorMessage"/>
	<br/>
	<form:label path="age" cssErrorClass="errorMessage">나이</form:label> : 
	<form:input path="age" size="30"/>
	<form:errors path="age" cssClass="errorMessage"/>
	
	<form:hidden path="visitCount" /><br/>
	
	<form:checkbox path="registered" label="등록했니?" /><br/>
	
	<form:checkboxes path="interestMap" items="${interests}" /><br/>
	
	
</form:form>